"""
给pdr文件加密
"""
import PyPDF2

reader = PyPDF2.PdfFileReader("")
writer = PyPDF2.PdfFileWriter()
for page_num in range(reader.numPages):
    # 加页码
    writer.addPage(reader.getPage(page_num))

# encrypt(""密码)
writer.encrypt("1234567890")
with open("", "w") as file:
    writer.write(file)
